package guice

import org.mongodb.scala.MongoClient
import play.api.{Configuration, Environment}
import play.api.inject._

/**
  * Created by wanglei on 17-3-16.
  */
class MongoModule extends Module {
  override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = Seq(
    bind[MongoClient].to(MongoClient(configuration.getString("elemental.mongo.uri").get)).eagerly()
  )
}
